<template>
  <div class="dashboard-editor-container">
    <div class=" clearfix">
      <pan-thumb :image="avatar" style="float: left">
        Your roles:
        <span v-for="item in roles" :key="item" class="pan-info-roles">{{ item }}</span>
      </pan-thumb>
      <github-corner style="position: absolute; top: 0px; border: 0; right: 0;" />
      <div class="info-container">
        <el-button class="edit" v-for="(role,index) in roleName" :key="index" size="small" style="margin-left:20px;">{{role}}</el-button>
      </div>
    </div>
    <div>
      <img src="./avatar.gif" class="emptyGif">
    </div>
  </div>
</template>

<script>
  import {
    mapGetters
  } from 'vuex'
  import PanThumb from '@/components/PanThumb'
  import GithubCorner from '@/components/GithubCorner'

  export default {
    name: 'DashboardEditor',
    components: {
      PanThumb,
      GithubCorner
    },
    data() {
      return {
        // emptyGif: 'https://wpimg.wallstcn.com/0e03b7da-db9e-4819-ba10-9016ddfdaed3'
      }
    },
    computed: {
      ...mapGetters([
        'name',
        'avatar',
        'roles',
        'roleName'
      ])
    }
  }

</script>

<style lang="scss" scoped>
  .emptyGif {
    display: block;
    width: 30%;
    margin: 0 auto;
  }

  .dashboard-editor-container {
    background-color: #e3e3e3;
    min-height: 100vh;
    padding: 50px 60px 0px;

    .pan-info-roles {
      font-size: 12px;
      font-weight: 700;
      color: #333;
      display: block;
    }

    .info-container {
      position: relative;
      margin-left: 160px;
      height: 150px;
      line-height: 200px;
      display: flex;
      // justify-content: center;
      align-items: center;

      .display_name {
        font-size: 48px;
        line-height: 48px;
        color: #212121;
        position: absolute;
        top: 25px;
      }
    }
  }

  .edit {
    color: #fff;
    height: 40px;
    background-color: rgb(21, 47, 72);
    border-color: rgb(21, 47, 72);
  }

  .edit:hover,
  .edit:focus {
    background: var(--el-button-hover-color);
    border-color: var(--el-button-hover-color);
    color: var(--el-button-font-color);
  }

</style>
